package com.topisv.tms.entity.work;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.topisv.tms.entity.AreaGroup;
import com.topisv.tms.entity.Customers;
import com.topisv.tms.entity.EdiOrder;
import com.topisv.tms.entity.IdEntity;

/**
 * 作业订单
 * @author ch
 *
 */
@Entity
@Table(name = "work_order")
public class WorkOrder extends IdEntity implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private String expressList;
	
	public String getExpressList() {
		return expressList;
	}

	public void setExpressList(String expressList) {
		this.expressList = expressList;
	}

	private int rankno;//打印顺序

	private String customerCode; //商家编码
	
	private String warehouseCode; //作业仓库

	private String batchCode; //作业批次编号
	
	private String taskCode; //作业任务编号
	
	private String expressNo;
	
	private String expressCompany;
	
	private String expressName;
	
	private String status; //订单状态
	
	private EdiOrder order;
	
	private String stockInfo;
	
	private String ebillNo;
	
	private String billType;
	
	private String flowType; //作业模式 （prePrint: 预先打单 ， intimePrint: 及时打单 ）
	
	private String printStatus; //打印状态
	
	private Integer weight;//商品重量
	
	private String goodsInfo; //商品需求明显 （sku:数量;）
	
	private int goodsNum; //商品数量
	
	private String cancelStatus; //异常类型（cancel : 取消单 ok: 正常单  refuse:拒收单  change: 换货单   outScope:超区件   lose:丢件单）
	
	private Date createTime; //创建时间
	
	private String ebillStatus; //创建电子面单状态 （create: 已创建 uncreate:未创建）
	
    private String sendOutStatus;//回调erp发货状态 finish(已经发货)
    
    private String customerOrderno;
    
    private String fromno;
    
    private String pkgLock; //包装锁（pkging: 包装中 unpkg:未包装 pkged: 已包装）
    
    private String invoiceNo;//发票号
    private String needInvoice;//发票打印标志(1需要打印，0不需要)
    private String invoiceOperate;//开票人
    
    private String guaranteeStatus;  //是否打印保险单1：已打印 0：未打印
    
    private String guaranteeCode;		//保修单任务编号
    
    private int printFlag;  //打印次数
	private int printFormFlag; //随行单打印次数
	
    private String prioritySendFlag;//优先派送标志 0:否 1:是  
    
    private String expressBuiltType; //单据中快递单号产生的方式(1:线下导入 非1:系统访问接口的方式,正常流程。)  add LiBin 20161013 
    
    private Date inputTime; //资料导入时间(针对导入的数据)  add LiBin 20161013 
    
    private String orderNo;
    
    private Date finishTime;
    
    public String getPrioritySendFlag() {
		return prioritySendFlag;
	}
	public void setPrioritySendFlag(String prioritySendFlag) {
		this.prioritySendFlag = prioritySendFlag;
	}
	
	public int getPrintFormFlag() {
		return printFormFlag;
	}

	public void setPrintFormFlag(int printFormFlag) {
		this.printFormFlag = printFormFlag;
	}
    
	public int getPrintFlag() {
		return printFlag;
	}

	public void setPrintFlag(int printFlag) {
		this.printFlag = printFlag;
	}

	public String getPkgLock() {
		return pkgLock;
	}

	public void setPkgLock(String pkgLock) {
		this.pkgLock = pkgLock;
	}

	public String getCustomerOrderno() {
		return customerOrderno;
	}

	public void setCustomerOrderno(String customerOrderno) {
		this.customerOrderno = customerOrderno;
	}

	public String getFromno() {
		return fromno;
	}

	public void setFromno(String fromno) {
		this.fromno = fromno;
	}

	public String getSendOutStatus() {
		return sendOutStatus;
	}

	public void setSendOutStatus(String sendOutStatus) {
		this.sendOutStatus = sendOutStatus;
	}

	
	public String getEbillStatus() {
		return ebillStatus;
	}

	public void setEbillStatus(String ebillStatus) {
		this.ebillStatus = ebillStatus;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCancelStatus() {
		return cancelStatus;
	}

	public void setCancelStatus(String cancelStatus) {
		this.cancelStatus = cancelStatus;
	}

	public int getGoodsNum() {
		return goodsNum;
	}

	public void setGoodsNum(int goodsNum) {
		this.goodsNum = goodsNum;
	}

	public String getGoodsInfo() {
		return goodsInfo;
	}

	public void setGoodsInfo(String goodsInfo) {
		this.goodsInfo = goodsInfo;
	}

	public int getRankno() {
		return rankno;
	}

	public void setRankno(int rankno) {
		this.rankno = rankno;
	}
	
	public Integer getWeight() {
		return weight;
	}

	public void setWeight(Integer weight) {
		this.weight = weight;
	}

	public String getPrintStatus() {
		return printStatus;
	}

	public void setPrintStatus(String printStatus) {
		this.printStatus = printStatus;
	}

	public String getCustomerCode() {
		return customerCode;
	}
	
	public String getExpressName() {
		return expressName;
	}



	public void setExpressName(String expressName) {
		this.expressName = expressName;
	}



	public void setCustomerCode(String customerCode) {
		this.customerCode = customerCode;
	}

	public String getWarehouseCode() {
		return warehouseCode;
	}

	public void setWarehouseCode(String warehouseCode) {
		this.warehouseCode = warehouseCode;
	}

	public String getFlowType() {
		return flowType;
	}

	public void setFlowType(String flowType) {
		this.flowType = flowType;
	}

	public String getExpressNo() {
		return expressNo;
	}

	public void setExpressNo(String expressNo) {
		this.expressNo = expressNo;
	}

	public String getExpressCompany() {
		return expressCompany;
	}

	public void setExpressCompany(String expressCompany) {
		this.expressCompany = expressCompany;
	}

	public String getEbillNo() {
		return ebillNo;
	}

	public void setEbillNo(String ebillNo) {
		this.ebillNo = ebillNo;
	}

	public String getBillType() {
		return billType;
	}

	public void setBillType(String billType) {
		this.billType = billType;
	}

	public String getStockInfo() {
		return stockInfo;
	}

	public void setStockInfo(String stockInfo) {
		this.stockInfo = stockInfo;
	}

	@ManyToOne
	@JoinColumn(name="orderno",referencedColumnName="ordeno")
	public EdiOrder getOrder() {
		return order;
	}

	public void setOrder(EdiOrder order) {
		this.order = order;
	}

	public String getBatchCode() {
		return batchCode;
	}

	public void setBatchCode(String batchCode) {
		this.batchCode = batchCode;
	}

	public String getTaskCode() {
		return taskCode;
	}

	public void setTaskCode(String taskCode) {
		this.taskCode = taskCode;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	public String getGuaranteeStatus() {
		return guaranteeStatus;
	}

	public void setGuaranteeStatus(String guaranteeStatus) {
		this.guaranteeStatus = guaranteeStatus;
	}

	//dto属性
	private Customers customer;
	
	private AreaGroup warehouse;
	
	private String stockCheck; //是否满足库存 (yes:满足 no:不满足)
	
	private String expressChinaName; //快递公司中文名
	
	@Transient
	public String getExpressChinaName() {
		return expressChinaName;
	}

	public void setExpressChinaName(String expressChinaName) {
		this.expressChinaName = expressChinaName;
	}

	@Transient
	public String getStockCheck() {
		return stockCheck;
	}

	public void setStockCheck(String stockCheck) {
		this.stockCheck = stockCheck;
	}

	@Transient
	public Customers getCustomer() {
		return customer;
	}

	public void setCustomer(Customers customer) {
		this.customer = customer;
	}

	@Transient
	public AreaGroup getWarehouse() {
		return warehouse;
	}

	public void setWarehouse(AreaGroup warehouse) {
		this.warehouse = warehouse;
	}

	public String getInvoiceNo() {
		return invoiceNo;
	}

	public void setInvoiceNo(String invoiceNo) {
		this.invoiceNo = invoiceNo;
	}

	public String getNeedInvoice() {
		return needInvoice;
	}

	public void setNeedInvoice(String needInvoice) {
		this.needInvoice = needInvoice;
	}

	public String getInvoiceOperate() {
		return invoiceOperate;
	}

	public void setInvoiceOperate(String invoiceOperate) {
		this.invoiceOperate = invoiceOperate;
	}

	public String getGuaranteeCode() {
		return guaranteeCode;
	}

	public void setGuaranteeCode(String guaranteeCode) {
		this.guaranteeCode = guaranteeCode;
	}

    public String getExpressBuiltType() {
        return expressBuiltType;
    }

    public void setExpressBuiltType(String expressBuiltType) {
        this.expressBuiltType = expressBuiltType;
    }

    public Date getInputTime() {
        return inputTime;
    }

    public void setInputTime(Date inputTime) {
        this.inputTime = inputTime;
    }
    
    @Transient
    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

	public Date getFinishTime() {
		return finishTime;
	}

	public void setFinishTime(Date finishTime) {
		this.finishTime = finishTime;
	}
    
}